﻿''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'
' Magic Content - A desktopmodule to publish content and send out
' newsletters from within the DotNetNuke® Portal Framework
'
'
' Copyright(c) 2005-2006 proeder.network.consult
' Philipp Becker (philipp.becker@portalfabrik.net)
' Internet: http://www.portalfabrik.net
'
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Imports System
Imports System.Data

Namespace dnnWerk.Modules.Nuntio.Content

    Public Class ContentInfo

        Implements DotNetNuke.Entities.Modules.IHydratable

#Region "Private Members"
        Private _contentId As Int32
        Private _moduleId As Int32
        Private _locale As String
        Private _title As String
        Private _content As String
        Private _role As String
        Private _priority As Int32
        Private _createdBy As Int32
        Private _createdDate As DateTime
        Private _isPublished As Boolean
        Private _isFallback As Boolean
        Private _version As Int32
#End Region

#Region "Constructors"

        Public Sub New()
        End Sub

#End Region

#Region "Public Properties"
        Public Property ContentId() As Int32
            Get
                Return _contentId
            End Get
            Set(ByVal Value As Int32)
                _contentId = Value
            End Set
        End Property

        Public Property ModuleId() As Int32
            Get
                Return _moduleId
            End Get
            Set(ByVal Value As Int32)
                _moduleId = Value
            End Set
        End Property

        Public Property Locale() As String
            Get
                Return _locale
            End Get
            Set(ByVal Value As String)
                _locale = Value
            End Set
        End Property

        Public Property Content() As String
            Get
                Return _content
            End Get
            Set(ByVal Value As String)
                _content = Value
            End Set
        End Property


        Public Property Title() As String
            Get
                Return _title
            End Get
            Set(ByVal Value As String)
                _title = Value
            End Set
        End Property

        Public Property Role() As String
            Get
                Return _role
            End Get
            Set(ByVal Value As String)
                _role = Value
            End Set
        End Property

        Public Property Priority() As Int32
            Get
                Return _priority
            End Get
            Set(ByVal Value As Int32)
                _priority = Value
            End Set
        End Property

        Public Property CreatedBy() As Int32
            Get
                Return _createdBy
            End Get
            Set(ByVal Value As Int32)
                _createdBy = Value
            End Set
        End Property

        Public Property CreatedDate() As DateTime
            Get
                Return _createdDate
            End Get
            Set(ByVal Value As DateTime)
                _createdDate = Value
            End Set
        End Property

        Public Property IsPublished() As Boolean
            Get
                Return _isPublished
            End Get
            Set(ByVal Value As Boolean)
                _isPublished = Value
            End Set
        End Property

        Public Property IsFallback() As Boolean
            Get
                Return _isFallback
            End Get
            Set(ByVal Value As Boolean)
                _isFallback = Value
            End Set
        End Property

        Public Property Version() As Int32
            Get
                Return _version
            End Get
            Set(ByVal Value As Int32)
                _version = Value
            End Set
        End Property

        Public Sub Fill(ByVal dr As System.Data.IDataReader) Implements DotNetNuke.Entities.Modules.IHydratable.Fill
            Try
                ModuleId = Convert.ToInt32(dr("ModuleId"))
            Catch
            End Try
            Try
                Locale = Convert.ToString(dr("Locale"))
            Catch
            End Try
            Try
                Content = Convert.ToString(dr("Content"))
            Catch
            End Try
            Try
                Title = Convert.ToString(dr("Title"))
            Catch
            End Try
            Try
                Role = Convert.ToString(dr("Role"))
            Catch
            End Try
            Try
                Priority = Convert.ToInt32(dr("Priority"))
            Catch
            End Try
            Try
                CreatedBy = Convert.ToInt32(dr("CreatedBy"))
            Catch
            End Try
            Try
                CreatedDate = Convert.ToDateTime(dr("CreatedDate"))
            Catch
            End Try
            Try
                IsPublished = Convert.ToBoolean(dr("IsPublished"))
            Catch
            End Try
            Try
                IsFallback = Convert.ToBoolean(dr("IsFallback"))
            Catch
            End Try
            Try
                Version = Convert.ToInt32(dr("Version"))
            Catch
            End Try
            Try
                ContentId = Convert.ToInt32(dr("ContentId"))
            Catch
            End Try
        End Sub

        Public Property KeyID() As Integer Implements DotNetNuke.Entities.Modules.IHydratable.KeyID
            Get
                Return _contentId
            End Get
            Set(ByVal value As Integer)
                _contentId = Value
            End Set
        End Property
#End Region

    End Class

End Namespace
